<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<link href="${contextPath}/styles/pagination.css" rel="stylesheet" type="text/css" />
<s:if test="page!=null">
<div class="div_right_bottom">
  <span>
<s:if test="page.totalPages le 1">
</s:if>
<s:else>
	<a href="javascript:${jumpMehtod}(1)"><img src="${contextPath}/images/btn_first.png"></a>
	<a href="javascript:${jumpMehtod}(${page.prePage})"><img src="${contextPath}/images/btn_pre.png"></a>
</s:else>

<s:if test="page.pageNo-5 gt 1">
	<s:if test="page.totalPages gt page.pageNo + 4">
		<s:bean name="org.apache.struts2.util.Counter" id="counter">
		   <s:param name="first" value="page.pageNo-5" />
		   <s:param name="last" value="page.pageNo+4" />
		   <s:iterator id="i">
		   		<s:if test="#i == page.pageNo"><a href="javascript:void(0);">${i}</a></s:if>
		   		<s:else>
		   			<s:if test="#i > 0 ">
		   			 <a href="javascript:${jumpMehtod}(${i})" style="color: blue;">${i}</a>
		   			</s:if>
		   			<s:else>
		   				 <a href="" style="color: blue;">${i}</a>
		   			</s:else>
		   		</s:else>
		   </s:iterator>
		</s:bean>
	</s:if>
	<s:else>
		<s:bean name="org.apache.struts2.util.Counter" id="counter">
		   <s:param name="first" value="page.totalPages-7" />
		   <s:param name="last" value="page.totalPages" />
		   <s:iterator id="i">
		   		<s:if test="#i == page.pageNo"><a href="javascript:void(0);">${i}</a></s:if>
		   		<s:else>
		   			<s:if test="#i > 0 ">
		   			 <a href="javascript:${jumpMehtod}(${i})" style="color: blue;">${i}</a>
		   			</s:if>
		   			<s:else>
		   				 <a href="" style="color: blue;">${i}</a>
		   			</s:else>
		   		</s:else>
		   </s:iterator>
		</s:bean>
	
	</s:else>
</s:if>
<s:else>
	<s:if test="page.totalPages gt 10">
		<s:bean name="org.apache.struts2.util.Counter" id="counter">
		   <s:param name="first" value="1" />
		   <s:param name="last" value="10" />
		   <s:iterator id="i">
		   		<s:if test="#i == page.pageNo"><a href="javascript:void(0);">${i}</a></s:if>
		   		<s:else>
		   			<s:if test="#i > 0 ">
		   			 <a href="javascript:${jumpMehtod}(${i})" style="color: blue;">${i}</a>
		   			</s:if>
		   			<s:else>
		   				 <a href="" style="color: blue;">${i}</a>
		   			</s:else>
		   		</s:else>
		   </s:iterator>
		</s:bean>
	
	</s:if>
	<s:else>
		<s:bean name="org.apache.struts2.util.Counter" id="counter">
		   <s:param name="first" value="1" />
		   <s:param name="last" value="page.totalPages" />
		   <s:iterator id="i">
		   		<s:if test="#i == page.pageNo"><a href="javascript:void(0);">${i}</a></s:if>
		   		<s:else>
		   			<s:if test="#i > 0 ">
		   			 <a href="javascript:${jumpMehtod}(${i})" style="color: blue;">${i}</a>
		   			</s:if>
		   			<s:else>
		   				 <a href="" style="color: blue;">${i}</a>
		   			</s:else>
		   		</s:else>
		   </s:iterator>
		</s:bean>
	</s:else>
</s:else>

<s:if test="page.pageNo gte page.totalPages">
</s:if>
<s:else>
	  <a href="javascript:${jumpMehtod}(${page.nextPage})"><img src="${contextPath}/images/btn_next.png"></a>
	  <a href="javascript:${jumpMehtod}(${page.totalPages})"><img src="${contextPath}/images/btn_last.png"></a>
</s:else> &nbsp;&nbsp;&nbsp;&nbsp;
共<font style="color:red">&nbsp;${page.totalPages}&nbsp;</font>页&nbsp;&nbsp;总记录数 <font style="color:red">${page.totalCount}</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>

</div>
</s:if>